package mapmaker.utils;

import java.util.Comparator;

import mapmaker.map.MapCell;

import org.apache.commons.math3.util.Pair;

public class ComparatorCellDist implements Comparator<Pair<Double, MapCell>> {

	@Override
	public int compare(Pair<Double, MapCell> arg0, Pair<Double, MapCell> arg1) {
		if(arg0.getKey() < arg1.getKey()) {
			return -1;
		} else if(arg0.getKey() > arg1.getKey()) {
			return 1;
		} else {
			return 0;
		}		
	}

}
